package io.github.edwinliu.anynet;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DbOpenHelper extends SQLiteOpenHelper {

    // 数据库名
    private static final String DATABASE_NAME = "anynet.db";

    // 表名
    public static final String TABLE_NAME = "nettype";

    private static final int DATABASE_VERSION = 1;
    //数据库版本号

    public DbOpenHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL("CREATE TABLE IF NOT EXISTS " + TABLE_NAME
                + "(_id INTEGER PRIMARY KEY AUTOINCREMENT, setName TEXT,setValue TEXT)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)   {

    }
}
